home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
aakint14.arc
/
SNDSERCH.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1986-08-24
|
2KB
|
38 lines
(********************************************************************)
(* THIS PROCEDURE WILL SEND A CHARACTER TO THE SERIAL PORT SPECIFIED*)
(* INPUT : Ser_Chan : INTEGER, Ch : CHAR *)
(* INPUT/OUTPUT : NONE *)
(* OUTPUT : Ok : BOOLEAN STATUS *)
(* USES : NO SIDE EFFECTS UNLESS DIAG MODE *)
(* CALLS : INTR *)
(* ERRORS : Time_Out *)
(* GLOBAL VARS : GLB SERIAL VARS *)
(* SUBJECT : Serial COMM, SEND CHAR OUT SERIAL PORT *)
(* DOMAIN : ARNO A. KARNER LEVEL : 001 *)
(********************************************************************)
PROCEDURE Send_Char ( Ser_Chan : INTEGER ;
CH : CHAR ;
VAR OK : BOOLEAN ) ;
VAR
Regs : Reg ;
BEGIN (* PROC *)
Regs.AH := 1 ;
Regs.DX := Ser_Chan ;
Regs.AL := ORD ( CH ) ;
INTR ( 20 , Regs ) ;
IF Regs.AH AND 128 = 0
THEN OK := TRUE
ELSE OK := FALSE ;
IF Glb_Diag
THEN BEGIN (* DIAG MODE *)
CSF [ Ser_Chan ] := CSF [ Ser_Chan ] AND $9E00;
CSF [ Ser_Chan ] := CSF [ Ser_Chan ] OR ( Regs.AH SHL 8 ) ;
Comm_Counters [ Ser_Chan ].Chars_Transmited :=
Comm_Counters [ Ser_Chan ].Chars_Transmited + 1.0 ;
END; (* DIAG MODE *)
END ; (* PROC *)